package com.agile.leetcode.collection.collectionCompare;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/4/8 10:04
 */
public class Client {
    public static void main(String[] args) {

        Student student1=new Student("zq",25);
        Student student=new Student("czk",26);
        List<Student> list=new ArrayList<>();
        list.add(student);
        list.add(student1);
        Collections.sort(list, new OwnComparator<>("name"));
        // 输出
        System.out.println(list);
    }
}
